package com.meaningless;

public class FizzBuzz {
    public String fizzBuzz(int number) {
        if (number < 1 || number > 100) {
            throw new IllegalArgumentException("Number must be between 1 and 100");
        }

        boolean has3 = String.valueOf(number).contains("3");
        boolean has5 = String.valueOf(number).contains("5");

        String result = "";
        if (has3) result += "Fizz";
        if (has5) result += "Buzz";
        if (!result.isEmpty()) return result;

        // 原有倍数逻辑
        if (number % 15 == 0) return "FizzBuzz";
        if (number % 3 == 0) return "Fizz";
        if (number % 5 == 0) return "Buzz";
        return String.valueOf(number);
    }
}